package com.topc.code.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.topc.base.model.PageResult;
import com.topc.base.utils.PageUtils;
import com.topc.code.mapper.ProblemContentCommitMapper;
import com.topc.code.service.IProblemContentCommitService;
import com.topc.problem.model.po.ProblemContentCommit;
import org.springframework.stereotype.Service;

@Service
public class ProblemContentCommitServiceImpl extends ServiceImpl<ProblemContentCommitMapper, ProblemContentCommit> implements IProblemContentCommitService {
    @Override
    public PageResult<ProblemContentCommit> searchByPage(int pageSize, int pageCurrent) {
        LambdaQueryWrapper<ProblemContentCommit> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        return PageUtils.pageToResult(this.getBaseMapper().selectPage(PageUtils.toPageBuild(pageSize, pageCurrent),lambdaQueryWrapper));
    }
}
